package com.mingke.chat.message.response;

import com.mingke.chat.message.EasyChatMessage;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 易聊消息响应基类
 */
public abstract class EasyChatResponse extends EasyChatMessage {
    /** 消息响应的编码*/
    private byte responseType;
    /** 字符串类型的消息时间串*/
    private String dateTime;

    public byte getResponseType() {
        return responseType;
    }

    public void setResponseType(byte responseType) {
        this.responseType = responseType;
    }

    @Override
    public void setMsgDateTime(Date msgDateTime) {
        super.setMsgDateTime(msgDateTime);
        //日期格式化工具
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.dateTime = dateFormat.format(msgDateTime);
    }
}
